<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : TCLREST</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Genel &#304;&#351;lemler : TCLREST]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 16:04:19 +0000</pubDate>
  <lastBuildDate>Fri, 22 Nov 2024 17:56:03 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=967</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[TCLREST : Merhaba Ya&#351;ar,Ya&#351;ad&#305;&#287;&#305;n problem...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=967&amp;PID=1911#1911</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=142">BilalCndn</a><br /><strong>Konu:</strong> 967<br /><strong>Gönderim Zamanı:</strong> 22&nbsp;Kasım&nbsp;2024 Saat 17:56<br /><br />Merhaba Yaşar,<div><br></div><div>Yaşadığın problem kullanmış olduğun google api servisi ile alakalı. Google dokümanlarını inceleyerek sorununa çözüm bulabilirsin.</div><div><br></div><div>İyi çalışmalar dilerim.</div>]]>
   </description>
   <pubDate>Fri, 22 Nov 2024 17:56:03 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=967&amp;PID=1911#1911</guid>
  </item> 
  <item>
   <title><![CDATA[TCLREST : var Form1 : TclForm; InputText...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=967&amp;PID=1909#1909</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=246">yasar</a><br /><strong>Konu:</strong> 967<br /><strong>Gönderim Zamanı:</strong> 22&nbsp;Kasım&nbsp;2024 Saat 14:24<br /><br /><div>var</div><div>&nbsp; Form1 : TclForm;</div><div>&nbsp; InputText : TclProEdit;</div><div>&nbsp; ResponseMemo : TclMemo;</div><div>&nbsp; Button1 : TclButton;</div><div>&nbsp; clRest : TCLRest;</div><div>&nbsp; RequestBody, ResponseBody : string;</div><div><br></div><div>void BtnOnClick;</div><div>{</div><div>&nbsp; // Kullanıcıdan alınan metni JSON formatında API'ye gönderilecek hale getiriyoruz</div><div>&nbsp;/* RequestBody = '{"contents":{"parts":{"text":"' + InputText.Text + '"}}"}';*/</div><div>&nbsp; &nbsp; RequestBody ='{"contents": { "role": "user","parts":{"text": "'+InputText.Text+'"}},"generationConfig": {"temperature": 1,"topK": 40,"topP": 0.95,"maxOutputTokens": 8192,"responseMimeType": "text/plain"</div><div>&nbsp; }</div><div>}'</div><div>&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; // clRest bileşeni ile API bağlantısı kuruyoruz</div><div>&nbsp; clRest.BaseURL = '<a href="https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateC&#111;ntent?key=AIzaSyDK6otfshbW_JlE6nwTgkx6lwfWpTSej8Y" target="_blank" rel="nofollow">https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=AIzaSyDK6otfshbW_JlE6nwTgkx6lwfWpTSej8Y</a>'; // Gerçek API endpointini kullanın</div><div>&nbsp; clRest.Accept = 'application/json';</div><div>&nbsp; clRest.Method = rmPOST;</div><div>&nbsp; clRest.AddHeader('Authorization', 'Bearer AIzaSyDK6otfshbW_JlE6nwTgkx6lwfWpTSej8Y');&nbsp;</div><div>&nbsp; clRest.AddBody(RequestBody, 'application/json');</div><div>&nbsp;&nbsp;</div><div>&nbsp; // API isteğini gönderiyoruz</div><div>&nbsp; clRest.Execute;</div><div>&nbsp;&nbsp;</div><div>&nbsp; // Yanıt kontrolü</div><div>&nbsp; if (clRest.Response &lt;&gt; '')&nbsp;</div><div>&nbsp; {</div><div>&nbsp; &nbsp; // Başarılı bir yanıt aldıysak, yanıtı ResponseMemo'ya ekliyoruz</div><div>&nbsp; &nbsp; ResponseBody = clRest.Response;</div><div>&nbsp; &nbsp; ResponseMemo.Lines.Add('Gemini Yanıtı: ' + ResponseBody);</div><div>&nbsp; }</div><div>&nbsp; else</div><div>&nbsp; {</div><div>&nbsp; &nbsp; // Yanıt alınamazsa hata mesajı veriyoruz</div><div>&nbsp; &nbsp; ResponseMemo.Lines.Add('API isteği başarısız oldu.');</div><div>&nbsp; }</div><div>}</div><div><br></div><div>{</div><div>&nbsp; // Form ve bileşenleri oluşturuyoruz</div><div>&nbsp; Form1 = TclForm.Create(Self);</div><div><br></div><div>&nbsp; // InputText (kullanıcının metin girdiği alan) oluşturuluyor</div><div>&nbsp; InputText = Form1.AddNewProEdit(Form1, 'InputText', 'Enter your query...');</div><div>&nbsp; InputText.Align = alTop;</div><div>&nbsp; InputText.Height = 45;</div><div>&nbsp; InputText.Margins.Top = 10;</div><div>&nbsp; InputText.Margins.Left = 10;</div><div>&nbsp; InputText.Margins.Right = 10;</div><div>&nbsp;&nbsp;</div><div>&nbsp; // Button1 (API çağrısını tetikleyen buton) oluşturuluyor</div><div>&nbsp; Button1 = Form1.AddNewButton(Form1, 'Button1', 'Send Request');</div><div>&nbsp; Button1.Align = alTop;</div><div>&nbsp; Button1.Margins.Top = 10;</div><div>&nbsp; Form1.AddNewEvent(Button1, tbeOnClick, 'BtnOnClick');</div><div><br></div><div>&nbsp; // ResponseMemo (yanıtı gösterecek alan) oluşturuluyor</div><div>&nbsp; ResponseMemo = Form1.AddNewMemo(Form1, 'ResponseMemo', 'Response will appear here...');</div><div>&nbsp; ResponseMemo.Align = alTop;</div><div>&nbsp; ResponseMemo.Height = 200;</div><div>&nbsp; ResponseMemo.Margins.Top = 10;</div><div>&nbsp; ResponseMemo.ReadOnly = True;</div><div>&nbsp;&nbsp;</div><div>&nbsp; // clRest bileşeni (API bağlantısı için) oluşturuluyor</div><div>&nbsp; clRest = TCLRest.Create;</div><div>&nbsp;&nbsp;</div><div>&nbsp; // Form çalıştırılıyor</div><div>&nbsp; Form1.Run;</div><div>}</div><div>yukardaki kod da yapay zekaya soru sorup cevap alam işlemi yapmak istedim</div><div>bana&nbsp;</div><div>Gemini Yanıtı: {"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https:\/\/developers.google.com\/identity\/sign-in\/web\/devconsole-project.","status":"UNAUTHENTICATED"}}</div><div><br></div><div>böyle bir mesaj yazdırdı nasıl düzelte bilirim&nbsp;</div><div>ilgilendiğiniz için teşekür ederim</div>]]>
   </description>
   <pubDate>Fri, 22 Nov 2024 14:24:10 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=967&amp;PID=1909#1909</guid>
  </item> 
 </channel>
</rss>